import React, {Component} from 'react';
import Search from "./components/Search";
import Main from "./components/Main";

class App extends Component {
    state = {
        searchVal: ""
    };
    setSearchVal = (searchVal) => {
        this.setState({
            searchVal
        })
    };

    render() {
        return (
            <div id="app">
                <div className="container">
                    <Search setSearchVal={this.setSearchVal}/>
                    <Main searchVal={this.state.searchVal}/>
                </div>
            </div>
        );
    }
}

export default App;